-
Notifications
You must be signed in to change notification settings - Fork 1k
Prerender heatmap in partial #5998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Nice. 🥳 |
3e35cf0 to
966bd97
Compare
Generated by 🚫 Danger |
064cf0e to
699ff14
Compare
|
Even though I spent quite a bit of time trying to make our custom configuration work alongside cal-heatmap, this approach makes a bit more sense. Modifying the library ended up requiring more code than writing the config itself. I really like that this removes the third-party dependency and results in a much cleaner, more maintainable, and self-contained solution. Just a quick question: what border-radius did you end up using for the squares? It seems to vary slightly across the three screenshots. Also, slightly increasing the spacing between columns and rows could help make the heatmap look a bit more balanced and visually appealing. Thank you. |
|
It's always 1px from bootstrap, although I certainly don't like to send 3.5 kb of |
|
With this approach is the javascript actually doing anything that couldn't be done in the rails rendering on the server? |
|
I've stopped just short of the layout because it depends on the CLDR's supplemental weekData which I can use with The TwitterCldr gem doesn't have the supplemental data necessary for doing the layout in Ruby. Nothing is stopping us from reading https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-core/supplemental/weekData.json ourselves, but that needs territories as the input, not just the locale, and idk if that information is available to the server (request with |
|
I've now moved the bootstrap styling to the CSS, saving about a dozen+ kB in the page response size. |
This is what is currently being applied with Bootstrap's
I've added
That's what Bootstrap already does, although to prevent the tooltip "merging" with the background and for better accessibility, dark tooltips are used in light mode and light ones in dark mode. |
tomhughes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I think this is good now.
|
I don't like the green. Also, it should show the current day, right now on May 16th I only see up to May 15. |
|
Could this be a new edition of #5802 but for days? And caching is probably also involved. Which green would you prefer (and for which color scheme)? In general it would be better to open a new issue for that though. |
|
The yearly history has already been mentioned in #5829, which should IMO be a precondition for that. And anything involving different light and dark color palletes requires watching the color scheme media query again, which I really want to avoid. |
|
I'm not 100% sure merging of this PR is causing this, but take a look at how e.g. my profile page looks now (Edge, Chrome, .. every browser and user profile I tried): |
|
nenad-vujicic > ... looks now (Edge, Chrome ... I can partly agree.
|
|
Looks OK to me in both Firefox and Chromium on linux whether or not I am logged in. |
|
I think I've found the culprit:
getUTCDay is [0,6], weekInfo.firstDay is [1,7], so the first shown week never starts for 0 === 7.
See #6018 |
for example I can't see any of my contributions because in the last few months I've had days with a lot more contributions
|










Ditching the ever-increasing amount of code required to accommodate CalHeatmap like in #5906 and going for a custom responsive solution.
Fixes #5905 and closes #5906. Also fixes #5810.
This also makes the history links of the heatmap tab-navigatable, even before hovering over each link.